<?
class iMVC_Dispatcher_Mlangs extends iMVC_Dispatcher_Abstract{

    public function disPatch($ctr,$act,$values){

        set_include_path(get_include_path().PATH_SEPARATOR.'lang/');
        $_GET['urlValue']=$values;
        $l=$_GET['ln'];
        $c=new $ctr(); 
        if(empty($l)){
            session_start();
            $l=$_SESSION['ln'];
        }
        else{
        
            session_start();
            $_SESSION['ln']=$l;
        }
            switch($l){
                case 'zh': 
                    $c->setLang(new zh());
                    break;
                case 'en':
                    $c->setLang(new en());
                    break;
                case 'it':
                    $c->setLang(new it());
                    break;
                default: 
                    $c->setLang(new zh());
                    break;
            }

           if(method_exists($c,$act)){ 
                $c->$act();
           }
           else{
            die("<h2>404 not found Action</h2>");
           }
    
    }

}


// vim600:ts=4 st=4 foldmethod=marker foldmarker=<<<,>>>
// vim600:syn=php commentstring=//%s
